<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ESP3D Lib: src/sd_ESP32.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="ESP3D_social_mini.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP3D Lib
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">3D Printer WiFi Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('sd___e_s_p32_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">sd_ESP32.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="sd___e_s_p32_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef _ESP_SD_H_</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#define _ESP_SD_H_</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="class_e_s_p___s_d.html">   25</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_e_s_p___s_d.html">ESP_SD</a>{</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <a class="code" href="class_e_s_p___s_d.html#a817e53986873586c0c55e078e3d0547d">ESP_SD</a>();</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <a class="code" href="class_e_s_p___s_d.html#a852571834c4c862077dab2104d539d9d">~ESP_SD</a>();</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    int8_t <a class="code" href="class_e_s_p___s_d.html#a6aaf0c538574f5a4f58df66e78cad9e1">card_status</a>();</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    uint32_t <a class="code" href="class_e_s_p___s_d.html#a939244c6b6b6b81f70503044b4274583">card_total_space</a>();</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    uint32_t <a class="code" href="class_e_s_p___s_d.html#ae91ce4b54e0c79f2cb13c9bdaab2c81d">card_used_space</a>();</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_e_s_p___s_d.html#a711c7a7ac7d491e3c3c1a063f48624ab">open</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * path, <span class="keywordtype">bool</span> readonly = <span class="keyword">true</span> );</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_e_s_p___s_d.html#a8a216a25688ba0a7afdebbb1b98f46b2">close</a>();</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    int16_t <a class="code" href="class_e_s_p___s_d.html#a5eb7e01dfdca42b88916a6185bcd8688">write</a>(<span class="keyword">const</span> uint8_t * data, uint16_t len);</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    int16_t <a class="code" href="class_e_s_p___s_d.html#a5eb7e01dfdca42b88916a6185bcd8688">write</a>(<span class="keyword">const</span> uint8_t <span class="keywordtype">byte</span>);</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    uint16_t <a class="code" href="class_e_s_p___s_d.html#a08bd2a5faf3ae537ef65cd7d5ba9812b">read</a>(uint8_t * buf, uint16_t nbyte);</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    int16_t <a class="code" href="class_e_s_p___s_d.html#a08bd2a5faf3ae537ef65cd7d5ba9812b">read</a>();</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    uint32_t <a class="code" href="class_e_s_p___s_d.html#abf4072cccbb5a4ef00a32e28998a2dcf">size</a>();</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    uint32_t <a class="code" href="class_e_s_p___s_d.html#a3474b13136a71ab6ea2afbe14025d9f9">available</a>();</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_e_s_p___s_d.html#ae497f0993b7d47eadb14077cf112c6da">exists</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * path);</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_e_s_p___s_d.html#afba93faa60b58ec284a38bac1174a680">dir_exists</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * path);</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_e_s_p___s_d.html#a977589ee73d8adf70d0f4993fe341103">remove</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * path);</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_e_s_p___s_d.html#ac53dd5b6c423e96bb7947203c212b031">rmdir</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * path);</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_e_s_p___s_d.html#a0e1854e81305bf626bd54390c2d62321">mkdir</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * path);</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_e_s_p___s_d.html#ae088288ee6fb745d499f99cc2f3353c3">isopen</a>();</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    String <a class="code" href="class_e_s_p___s_d.html#a9e64df598230da334409993890f11551">makepath83</a>(String longpath);</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    String <a class="code" href="class_e_s_p___s_d.html#ab807ae35195d76b24121e455c7a0375b">makeshortname</a>(String longname, uint8_t index = 1);</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_e_s_p___s_d.html#a5cbfd0f7a7a913204ce3078893ed912e">openDir</a>(String path);</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_e_s_p___s_d.html#a1d90e39616a040395f2f317fb0d4f3f6">readDir</a>(<span class="keywordtype">char</span> name[13], uint32_t * <a class="code" href="class_e_s_p___s_d.html#abf4072cccbb5a4ef00a32e28998a2dcf">size</a>, <span class="keywordtype">bool</span> * <a class="code" href="class_e_s_p___s_d.html#a181e755c79ffe79d25e8b74385be85f6">isFile</a>);</div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="class_e_s_p___s_d.html#a181e755c79ffe79d25e8b74385be85f6">   50</a></span>&#160;    <span class="keywordtype">bool</span> * <a class="code" href="class_e_s_p___s_d.html#a181e755c79ffe79d25e8b74385be85f6">isFile</a>;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keyword">private</span>:</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keywordtype">void</span> * _sdfile;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    uint32_t _size;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    uint32_t _pos;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keywordtype">bool</span> _readonly;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    String get_path_part(String data, <span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    </div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;};</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclass_e_s_p___s_d_html_a08bd2a5faf3ae537ef65cd7d5ba9812b"><div class="ttname"><a href="class_e_s_p___s_d.html#a08bd2a5faf3ae537ef65cd7d5ba9812b">ESP_SD::read</a></div><div class="ttdeci">int16_t read()</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_ae91ce4b54e0c79f2cb13c9bdaab2c81d"><div class="ttname"><a href="class_e_s_p___s_d.html#ae91ce4b54e0c79f2cb13c9bdaab2c81d">ESP_SD::card_used_space</a></div><div class="ttdeci">uint32_t card_used_space()</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_a9e64df598230da334409993890f11551"><div class="ttname"><a href="class_e_s_p___s_d.html#a9e64df598230da334409993890f11551">ESP_SD::makepath83</a></div><div class="ttdeci">String makepath83(String longpath)</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_a3474b13136a71ab6ea2afbe14025d9f9"><div class="ttname"><a href="class_e_s_p___s_d.html#a3474b13136a71ab6ea2afbe14025d9f9">ESP_SD::available</a></div><div class="ttdeci">uint32_t available()</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_a817e53986873586c0c55e078e3d0547d"><div class="ttname"><a href="class_e_s_p___s_d.html#a817e53986873586c0c55e078e3d0547d">ESP_SD::ESP_SD</a></div><div class="ttdeci">ESP_SD()</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_ab807ae35195d76b24121e455c7a0375b"><div class="ttname"><a href="class_e_s_p___s_d.html#ab807ae35195d76b24121e455c7a0375b">ESP_SD::makeshortname</a></div><div class="ttdeci">String makeshortname(String longname, uint8_t index=1)</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html"><div class="ttname"><a href="class_e_s_p___s_d.html">ESP_SD</a></div><div class="ttdef"><b>Definition:</b> <a href="sd___e_s_p32_8h_source.html#l00025">sd_ESP32.h:25</a></div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_a0e1854e81305bf626bd54390c2d62321"><div class="ttname"><a href="class_e_s_p___s_d.html#a0e1854e81305bf626bd54390c2d62321">ESP_SD::mkdir</a></div><div class="ttdeci">bool mkdir(const char *path)</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_ae497f0993b7d47eadb14077cf112c6da"><div class="ttname"><a href="class_e_s_p___s_d.html#ae497f0993b7d47eadb14077cf112c6da">ESP_SD::exists</a></div><div class="ttdeci">bool exists(const char *path)</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_a6aaf0c538574f5a4f58df66e78cad9e1"><div class="ttname"><a href="class_e_s_p___s_d.html#a6aaf0c538574f5a4f58df66e78cad9e1">ESP_SD::card_status</a></div><div class="ttdeci">int8_t card_status()</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_ae088288ee6fb745d499f99cc2f3353c3"><div class="ttname"><a href="class_e_s_p___s_d.html#ae088288ee6fb745d499f99cc2f3353c3">ESP_SD::isopen</a></div><div class="ttdeci">bool isopen()</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_a977589ee73d8adf70d0f4993fe341103"><div class="ttname"><a href="class_e_s_p___s_d.html#a977589ee73d8adf70d0f4993fe341103">ESP_SD::remove</a></div><div class="ttdeci">bool remove(const char *path)</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_a5eb7e01dfdca42b88916a6185bcd8688"><div class="ttname"><a href="class_e_s_p___s_d.html#a5eb7e01dfdca42b88916a6185bcd8688">ESP_SD::write</a></div><div class="ttdeci">int16_t write(const uint8_t *data, uint16_t len)</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_a8a216a25688ba0a7afdebbb1b98f46b2"><div class="ttname"><a href="class_e_s_p___s_d.html#a8a216a25688ba0a7afdebbb1b98f46b2">ESP_SD::close</a></div><div class="ttdeci">void close()</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_afba93faa60b58ec284a38bac1174a680"><div class="ttname"><a href="class_e_s_p___s_d.html#afba93faa60b58ec284a38bac1174a680">ESP_SD::dir_exists</a></div><div class="ttdeci">bool dir_exists(const char *path)</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_a5cbfd0f7a7a913204ce3078893ed912e"><div class="ttname"><a href="class_e_s_p___s_d.html#a5cbfd0f7a7a913204ce3078893ed912e">ESP_SD::openDir</a></div><div class="ttdeci">bool openDir(String path)</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_abf4072cccbb5a4ef00a32e28998a2dcf"><div class="ttname"><a href="class_e_s_p___s_d.html#abf4072cccbb5a4ef00a32e28998a2dcf">ESP_SD::size</a></div><div class="ttdeci">uint32_t size()</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_ac53dd5b6c423e96bb7947203c212b031"><div class="ttname"><a href="class_e_s_p___s_d.html#ac53dd5b6c423e96bb7947203c212b031">ESP_SD::rmdir</a></div><div class="ttdeci">bool rmdir(const char *path)</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_a181e755c79ffe79d25e8b74385be85f6"><div class="ttname"><a href="class_e_s_p___s_d.html#a181e755c79ffe79d25e8b74385be85f6">ESP_SD::isFile</a></div><div class="ttdeci">bool * isFile</div><div class="ttdef"><b>Definition:</b> <a href="sd___e_s_p32_8h_source.html#l00050">sd_ESP32.h:50</a></div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_a939244c6b6b6b81f70503044b4274583"><div class="ttname"><a href="class_e_s_p___s_d.html#a939244c6b6b6b81f70503044b4274583">ESP_SD::card_total_space</a></div><div class="ttdeci">uint32_t card_total_space()</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_a852571834c4c862077dab2104d539d9d"><div class="ttname"><a href="class_e_s_p___s_d.html#a852571834c4c862077dab2104d539d9d">ESP_SD::~ESP_SD</a></div><div class="ttdeci">~ESP_SD()</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_a1d90e39616a040395f2f317fb0d4f3f6"><div class="ttname"><a href="class_e_s_p___s_d.html#a1d90e39616a040395f2f317fb0d4f3f6">ESP_SD::readDir</a></div><div class="ttdeci">bool readDir(char name[13], uint32_t *size, bool *isFile)</div></div>
<div class="ttc" id="aclass_e_s_p___s_d_html_a711c7a7ac7d491e3c3c1a063f48624ab"><div class="ttname"><a href="class_e_s_p___s_d.html#a711c7a7ac7d491e3c3c1a063f48624ab">ESP_SD::open</a></div><div class="ttdeci">bool open(const char *path, bool readonly=true)</div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="sd___e_s_p32_8h.html">sd_ESP32.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
